# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudSupport.V2beta.Model.FeedItem do
  @moduledoc """
  A feed item associated with a support case.

  ## Attributes

  *   `attachment` (*type:* `GoogleApi.CloudSupport.V2beta.Model.Attachment.t`, *default:* `nil`) - Output only. An attachment attached to the case.
  *   `comment` (*type:* `GoogleApi.CloudSupport.V2beta.Model.Comment.t`, *default:* `nil`) - Output only. A comment added to the case.
  *   `deletedAttachment` (*type:* `GoogleApi.CloudSupport.V2beta.Model.Attachment.t`, *default:* `nil`) - Output only. A deleted attachment that used to be associated with the support case.
  *   `emailMessage` (*type:* `GoogleApi.CloudSupport.V2beta.Model.EmailMessage.t`, *default:* `nil`) - Output only. An email message received in reply to the case.
  *   `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time corresponding to the event of this item.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attachment => GoogleApi.CloudSupport.V2beta.Model.Attachment.t() | nil,
          :comment => GoogleApi.CloudSupport.V2beta.Model.Comment.t() | nil,
          :deletedAttachment => GoogleApi.CloudSupport.V2beta.Model.Attachment.t() | nil,
          :emailMessage => GoogleApi.CloudSupport.V2beta.Model.EmailMessage.t() | nil,
          :eventTime => DateTime.t() | nil
        }

  field(:attachment, as: GoogleApi.CloudSupport.V2beta.Model.Attachment)
  field(:comment, as: GoogleApi.CloudSupport.V2beta.Model.Comment)
  field(:deletedAttachment, as: GoogleApi.CloudSupport.V2beta.Model.Attachment)
  field(:emailMessage, as: GoogleApi.CloudSupport.V2beta.Model.EmailMessage)
  field(:eventTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.CloudSupport.V2beta.Model.FeedItem do
  def decode(value, options) do
    GoogleApi.CloudSupport.V2beta.Model.FeedItem.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudSupport.V2beta.Model.FeedItem do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
